Fancy trick to center plotly chart. Use the same id and chunk
arguments (like results and echo).
library(ggplot2)
library(plotly)
plot_data <- diamonds[sample(1:nrow(diamonds), 500), ]
plot_ly(
plot_data,
x = ~carat,
y = ~price,
type = "scatter",
mode = "markers"
) %>%
layout(
paper_bgcolor = "#1e1e20",
plot_bgcolor = "#1e1e20",
font = list(color = "#ffffff")
)
knitr:: include_url("https://public.tableau.com/views/day5479kickstarter/Dashboard1?:showVizHome=no&:embed=true")